package com.hhwy.framework.persistent.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hhwy.framework.util.PlatformTools;


/**
 * <b>类 名 称：</b>Domain 实体的基类，定义了公有的属性<br/>
 * <b>类 描 述：</b><br/>
 * <b>创 建 人：</b>lihuiming<br/>
 * <b>修 改 人：</b>lihuiming<br/>
 * <b>修改时间：</b>2014年8月4日 上午8:46:01<br/>
 * <b>修改备注：</b><br/>
 * @version 1.0.0<br/>
 */
@MappedSuperclass
public abstract class Domain implements Serializable{
	private static final long serialVersionUID = -2007614840055734945L;

	@Id
	@Column(name="id", length=32)
	private String id = PlatformTools.getID();

	@Column(name="create_user",length=32,updatable=false)
	private String createUser ;
	@Column(name="update_user",length=32,updatable=true,insertable=true)
	private String updateUser ;
	@Column(name="create_time", updatable=false)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Timestamp createTime ;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@Column(name="update_time", updatable=true,insertable=true)
	private Timestamp updateTime ;
	@Column(name="delete_flag",length=2,updatable=false)
	private String deleteFlag = "0" ;
	
	
	public String getId() {
		
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public Timestamp getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	public String getDeleteFlag()
	{
		return deleteFlag;
	}

	public void setDeleteFlag(String deleteFlag)
	{
		this.deleteFlag = deleteFlag;
	}
}
